<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>模块增加</title>
<link rel="stylesheet" href="<%=basePath%>res/wzw/layui/css/layui.css"
	media="all">
<style type="text/css">
#goodsImg {
	position: relative;
	left: 110px;
}
</style>
</head>
<body>

	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>模块增加列表</legend>
	</fieldset>

	<form class="layui-form"
		action="<%=basePath%>foodType/foodTypeAdd" method="post">

		<input type="hidden" id="oper" name="oper" value=$(window.parent.parent.document.body).find("#"username")>
		<div class="layui-form-item">
			<label class="layui-form-label">类型名称</label>
			<div class="layui-input-block">
				<input type="text" name="type_name" id="type_name" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input"
					maxlength="20">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">类型描述</label>
			<div class="layui-input-block">
				<input type="text" name="type_remark" id="type_remark" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input"
					maxlength="20">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">是否有效</label>
			<div class="layui-input-block">
				<select name="isva" id="isva" required lay-verify="required"
					autocomplete="off" class="layui-input">
					<option></option>
					<option value="0">无效</option>
					<option value="1">有效</option>
				</select>
			</div>
		</div>

		<!-- 提交重置 -->
		<div class="layui-form-item">
			<div class="layui-input-block">
				<input type="submit" class="layui-btn" lay-submit="" onclick="Add()"
					lay-filter="TypeAdd" value="立即提交">
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>

	<script src="<%=basePath%>res/wzw/layui/layui.js"></script>
	<script type="text/javascript" src="res/wzw/layui/js/jquery.min.js"></script>
	<script>
	layui.use(['form', 'layer'], function(){
	  var form = layui.form
	  ,layer = layui.layer
	  ,$ = layui.$;
	  form.on('submit(TypeAdd)',function(){
		  parent.location.reload(); // 父页面刷新
	  });

	});

	// function Add() {
	// 	$.ajax({
	// 		type:"POST",
	// 		url:"foodType/foodTypeAdd",
	// 		data:$("form").serialize(),
	// 		dataType:"json",
	// 		success:function (data) {
	//
	// 				window.location.reload();
	//
	// 		}
	// 	})
	// }


	
</script>

</body>
</html>